const reg = /=foo/;

if (reg.test('foo')) {
  console.log('Pass');
}
